package com.ymkyve.complex.web;

import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.URL;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
    	URL u;
		try {
			u = new URL("http://developer.51cto.com");
			
			HttpURLConnection conn = (HttpURLConnection)u.openConnection();
			
			
			System.out.println(InetAddress.getByName("http://www.aerohive.com").getHostAddress());
			
			
			System.out.println(conn.getHeaderField(5));
			System.out.println(conn.getHeaderField("host"));
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	
        
    }
}
